#include "QbbridgeMsgProcess.h"
#include <qbkernel/include/qb_base.h>
#include <qbprotocol/include/rdProto.h>
#include <qbprotocol/include/MessageParserTool.h>

using namespace qb;
#define Reg_Func(ID) qbBase::getMessageBond()->RegisterDecodeFunc(ID, qbbridge::ExtracFunc)
#define DelPtr(FUNC, TYPE) \
	case FUNC:\
	{\
		TYPE* p = static_cast<TYPE*>(toDel);\
		delete p;\
		return nullptr;\
	}\
	break;


void qbbridge::InitDecodeFuncs()
{

}

static void* delAck(int func, void* toDel)
{
	return toDel;
}
void* qbbridge::ExtracFunc(int func, const ProtoMessage& msg, void* toDel)
{
	if (toDel != nullptr)
		return delAck(func, toDel);

	return nullptr;
}
